<h1>Editing computer</h1>

<%= error_messages_for :computer %>

<% form_for(@computer) do |f| %>
  <p>
    <b>提供者</b><br />
    <%= f.text_field :user_name %>
  </p>
  <p>
    <b>link</b><br />
    <%= f.text_field :user_link %>
  </p>
  <p>
    <b>標題</b><br />
    <%= f.text_field :title %>
  </p>
  <p>
    <b>處理器</b><br />
    <%= f.text_field :cpu %>
    <b>$</b>
    <%= f.text_field :cpu_price %>
  </p>
  <p>
    <b>記憶體</b><br />
    <%= f.text_field :ram %>
    <b>$</b>
    <%= f.text_field :ram_price %>
  </p>
  <p>
    <b>主機板</b><br />
    <%= f.text_field :motherboard %>
    <b>$</b>
    <%= f.text_field :motherboard_price %>
  </p>
  <p>
    <b>顯示卡</b><br />
    <%= f.text_field :vga %>
    <b>$</b>
    <%= f.text_field :vga_price %>
  </p>
  <p>
    <b>硬碟</b><br />
    <%= f.text_field :hd %>
    <b>$</b>
    <%= f.text_field :hd_price %>
  </p>
  <p>
    <b>光碟機</b><br />
    <%= f.text_field :cd %>
    <b>$</b>
    <%= f.text_field :cd_price %>
  </p>
  <p>
    <b>音效卡</b><br />
    <%= f.text_field :audio %>
    <b>$</b>
    <%= f.text_field :audio_price %>
  </p>
  <p>
    <b>電源供應器</b><br />
    <%= f.text_field :power %>
    <b>$</b>
    <%= f.text_field :power_price %>
  </p>
  <p>
    <b>備註</b><br />
    <%= f.text_area(:description, :cols=>'30', :rows=>'10')%>
  </p>
  <p>
    <%= f.submit "Update" %>
  </p>
<% end %>

<% unless session[:user_id].nil? %>
  <%= link_to image_tag('show_computer.gif'), @computer %> |
  <%= link_to image_tag('back.gif'), computers_path %>
<% end %>
